package com.sfac.modules.test.pojo;



import com.sfac.modules.common.pojo.AbstractEntity;
import lombok.Data;

import javax.persistence.*;
import java.util.List;

@Data
@Entity
@Table(name = "test_student")
public class Student  extends AbstractEntity {
    private String studentName;
    @OneToOne(targetEntity = Card.class,cascade = CascadeType.ALL)
    @JoinColumn(name = "card_id",unique = true)
    private Card studentCard;
    @ManyToMany(mappedBy = "students",cascade = CascadeType.ALL)
    private List<Clazz> clazzes;


}
